package com.example.springboot004mybatis.mapper;

import com.example.springboot004mybatis.model.UserImpression;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserImpressionMapper {

    @Select("""
            select * from user_impression where user_id = #{id}
            """)
    @Results(id = "userImpression", value = {
            @Result(id = true, column = "id", property = "id"),
            @Result(column = "user_id", property = "userId"),
            @Result(column = "context", property = "context"),
    })
    List<UserImpression> selectByUserId(Integer id);
}
